package com.nuanshui.heatedloan.search.facade;

import java.util.HashMap;
import java.util.List;

import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.get.MultiGetResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.update.UpdateResponse;

import com.nuanshui.heatedloan.search.facade.model.ElasticSearchRequest;
import com.nuanshui.heatedloan.search.facade.model.ElasticSearchResponse;


public interface ElasticSearchService {
	
	
	boolean isIndexExist(String id);
	
	String createIndex(String index, String type, String id, String jsonData);
	
	
    UpdateResponse updateIndex(String index, String type, String id, String jsonData);
	  
    boolean removeDocument(String index, String type, String id);
    MultiGetResponse findByMultipleIndexs(List<ElasticSearchRequest> requests);
    
    
    List<String> getAlldata(MultiGetResponse multiGetResponse);
    
    GetResponse findDocumentByIndex(String index, String type, String id);
    
    
    SearchResponse findDocument(String index, String type, String field, String value);
    
    ElasticSearchResponse findDocumentStr(String index, String type, HashMap<String, String> params);

    ElasticSearchResponse findDocument(ElasticSearchRequest request);


    String test();

}
